﻿#include<iostream>
#include<stack>
#include <algorithm>
using namespace std;
//static int a1[99999999];//堆里面开，够大
int main()
{
	int c;
	stack<int>a;
	long   i, c1, c2, d;
	long k = 0;
	long j = 0;
	long n;
	cin >> n;
	int* a1 = new int[2*n];
	

	for (i = 0; i < 2*n; i++)
	{
			cin >> c;
			a1[i] = c;
	}
	i--;
	sort(a1, a1 + n + n);
	if (i == 1) 
	{ cout << a1[0]; }
	else {

			for (; i >= 0; i--)
			{
				if (a.empty()) {
					a.push(a1[i]);

				}
				else {

					if (a1[i] != a.top())
					{
						a.push(a1[i]);
					}

				}

			}
			if (a.size() % 2 == 0)
			{
				for (i = 0; i < (a.size()) / 2; i++)
				{

					a.pop();
				}
			}
			else
			{
				for (i = 0; i < (a.size() / 2) + 1; i++)
				{

					a.pop();
				}
			}
			cout << a.top();
		}



	
}
